<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>验证码</title>
        <script src="https://lib.baomitu.com/jquery/3.0.0/jquery.min.js"></script>
        <script src="https://ssl.captcha.qq.com/TCaptcha.js"></script>
        <style>
            body{
				background: url(/miscellaneous/static/images/toolbox-bob/blur.jpg) no-repeat top center;
				background-size: cover
            }
        </style>
    </head>
	<body>
		<script>
            var getParam = function(){
                var url = location.href,
                    index = url.indexOf('?'),
                    param = url.substring(index + 1),
                    paramArray = param.split("&"),
                    Obj = {};
                    
                for(var x = 0; x < paramArray.length; x++){
                    var index = paramArray[x].indexOf("="),
                        key = index === -1 ? "" : paramArray[x].substring(0, index),
                        value = index === -1 ? "" :  paramArray[x].substring(index + 1);
                        
                    Obj[key] = value;
                }
                
                return Obj;
            };
            
            var fields = getParam();
            document.addEventListener('plusready', function(){
                captcha = new TencentCaptcha(fields.captchaId, function(res){
                    plus.storage.setItem('TencentCaptchaResult', JSON.stringify(res));
                    plus.webview.close(plus.webview.currentWebview());
                });
                
                captcha.show();
            }, false);
        </script>
	</body>
</html>